package gui.kat;

public class KategoriTreDheDy extends Kategori {
    public KategoriTreDheDy(int index){
        super("Tre dhe Dy",index);
    }

    public int llogaritPiket(int[] zarat) {
        int count[]=new int[7];

        for(int i=0; i<zarat.length;i++){
            count[zarat[i]]++;
        }

        if(contains(count,2) && contains(count,3)) return 25;

        return 0;
    }

    private boolean contains(int[] piket,int vlera){
        for(int i=0; i<piket.length; i++){
            if(piket[i]==vlera) return true;
        }
        return false;
    }
}
